﻿using UnityEngine;
using System.Collections;

public class coin : MonoBehaviour {

	// Use this for initialization
	void Start () {
	
	}
	
	// Update is called once per frame
	void Update () {

		transform.RotateAround (transform.position, transform.up, Time.deltaTime*30);
	
	}

	void OnTriggerEnter(Collider obj)
	{
		if(obj.CompareTag("Player1"))
		{
			GameObject.Destroy(gameObject);
		}
	}
}
